﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Schedule.aspx.cs" Inherits="中学____排课系统.Schedule" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
        </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ScheduleID" DataSourceID="SqlDataSource1" Height="16px" Width="102px">
            <Columns>
                <asp:BoundField DataField="ScheduleID" HeaderText="ScheduleID" ReadOnly="True" SortExpression="ScheduleID" />
                <asp:BoundField DataField="TeacherID" HeaderText="TeacherID" SortExpression="TeacherID" />
                <asp:BoundField DataField="CourseID" HeaderText="CourseID" SortExpression="CourseID" />
                <asp:BoundField DataField="ClassroomID" HeaderText="ClassroomID" SortExpression="ClassroomID" />
                <asp:BoundField DataField="TimeSlotID" HeaderText="TimeSlotID" SortExpression="TimeSlotID" />
                <asp:BoundField DataField="ClassID" HeaderText="ClassID" SortExpression="ClassID" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:中学排课系统ConnectionString %>" DeleteCommand="DELETE FROM [Schedule] WHERE [ScheduleID] = @ScheduleID" InsertCommand="INSERT INTO [Schedule] ([ScheduleID], [TeacherID], [CourseID], [ClassroomID], [TimeSlotID], [ClassID]) VALUES (@ScheduleID, @TeacherID, @CourseID, @ClassroomID, @TimeSlotID, @ClassID)" SelectCommand="SELECT * FROM [Schedule]" UpdateCommand="UPDATE [Schedule] SET [TeacherID] = @TeacherID, [CourseID] = @CourseID, [ClassroomID] = @ClassroomID, [TimeSlotID] = @TimeSlotID, [ClassID] = @ClassID WHERE [ScheduleID] = @ScheduleID">
            <DeleteParameters>
                <asp:Parameter Name="ScheduleID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="ScheduleID" Type="Int32" />
                <asp:Parameter Name="TeacherID" Type="Int32" />
                <asp:Parameter Name="CourseID" Type="Int32" />
                <asp:Parameter Name="ClassroomID" Type="Int32" />
                <asp:Parameter Name="TimeSlotID" Type="Int32" />
                <asp:Parameter Name="ClassID" Type="Int32" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="TeacherID" Type="Int32" />
                <asp:Parameter Name="CourseID" Type="Int32" />
                <asp:Parameter Name="ClassroomID" Type="Int32" />
                <asp:Parameter Name="TimeSlotID" Type="Int32" />
                <asp:Parameter Name="ClassID" Type="Int32" />
                <asp:Parameter Name="ScheduleID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>
